package sg.org.scs.splashawards.dto;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name="team")
public class Team implements Serializable{
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="Team_Id")
	private int teamId;
	
	@Column(name="Team_Name")
	private String teamName;
	
	@Column(name="Case_Study")
	private String caseStudy;
	
	@Column(name="Team_Level")
	private String teamLevel;
	
	@Column(name="School_Name")
	private String schoolName;
	
	@ManyToOne(cascade=CascadeType.ALL)
	@JoinTable(name="mentor_team",joinColumns={@JoinColumn(name="team_Id")},inverseJoinColumns={@JoinColumn(name="Mentor_Id")})
	private Mentor mentor;
	
	@OneToMany(cascade=CascadeType.ALL)
	@JoinColumn(name="Team_Id",nullable=false,unique=true)
	private List<TeamAttachment> attachment;
	
	@OneToMany(cascade=CascadeType.ALL)
	@JoinTable(name="student_team",joinColumns={@JoinColumn(name="team_id")},inverseJoinColumns={@JoinColumn(name="Student_Id")})
	private List<Student> student;
	
	@OneToMany(cascade=CascadeType.ALL)
	@JoinColumn(name="Team_Id",nullable=false)
	private List<Participation> participation;
	
	public int getTeamId() {
		return teamId;
	}
	public void setTeamId(int teamId) {
		this.teamId = teamId;
	}
	public String getTeamName() {
		return teamName;
	}
	public void setTeamName(String teamName) {
		this.teamName = teamName;
	}
	public String getSchoolName() {
		return schoolName;
	}
	public void setSchoolName(String schoolName) {
		this.schoolName = schoolName;
	}
	public Mentor getMentor() {
		return mentor;
	}
	public void setMentor(Mentor mentor) {
		this.mentor = mentor;
	}
	public List<TeamAttachment> getAttachment() {
		return attachment;
	}
	public void setAttachment(List<TeamAttachment> attachment) {
		this.attachment = attachment;
	}
	public List<Student> getStudent() {
		return student;
	}
	public void setStudent(List<Student> student) {
		this.student = student;
	}
	public List<Participation> getParticipation() {
		return participation;
	}
	public void setParticipation(List<Participation> participation) {
		this.participation = participation;
	}
	public String getCaseStudy() {
		return caseStudy;
	}
	public void setCaseStudy(String caseStudy) {
		this.caseStudy = caseStudy;
	}
	public String getTeamLevel() {
		return teamLevel;
	}
	public void setTeamLevel(String teamLevel) {
		this.teamLevel = teamLevel;
	}

	
	
	
	
}
